<template>
  <div class="title">
    <van-icon name="arrow-left" @click="$router.back()" />
    <h1>{{newsList.title}}</h1>
  </div>
  <div class="warp">
    <div class="info-warp" v-html="newsList.content">

    </div>
    <p>{{newsList.createTime}}</p>
  </div>
</template>
<script>
import { ref, defineComponent, reactive, onMounted, toRefs, nextTick } from "vue";
import { appNoticeList, appNoticeInfo, appNoticeIpage } from "@/api/public";
import { useRouter } from "vue-router";
import { Toast } from "vant";
import { useStore } from "vuex";
export default {
  setup() {
    const router = useRouter()
    const newsList = ref([])


    onMounted(() => {
      const data = { id: router.currentRoute.value.query.id }
      appNoticeInfo(data).then(res => {
        console.log(res)
        newsList.value = res.data.data
      })
    })


    return {
      newsList

    }
  }
}

</script>
<style lang="less" scoped>
.title {
  padding: 20px;
  width: 94%;
  color: #ffffff;
  display: flex;
  align-items: center;
  h1 {
    margin: 0;
    font-size: 32px;
    font-family: Source Han Sans CN;
    font-weight: normal;
    color: #ffffff;
    text-align: center;
    display: block;
    width: 90%;
  }
  span {
    display: inline-block;
    font-size: 26px;
    font-family: Source Han Sans CN;
    font-weight: 300;
    color: #ffffff;
  }
  .van-icon-arrow-left {
    font-size: 50px;
  }
}

.warp {
  padding: 30px;
  // background: #282a2c;
  border-radius: 20px;
  margin: 36px;
  h1 {
    color: #ffffff;
    text-align: center;
    font-weight: normal;
    font-family: Source Han Sans CN;
    font-size: 32px;
  }
  p {
    color: #999;
    text-align: right;
    font-size: 32px;
    font-family: Source Han Sans CN;
    font-weight: 400;
    color: #ffffff;
  }
  .info-warp {
    /deep/p {
      font-size: 32px;
      font-family: Source Han Sans CN;
      font-weight: 400;
      color: #ffffff;
      line-height: 53px;
      word-break: break-all;
    }
    /deep/img {
      width: 100%;
    }
    img {
      width: 150px;
    }
  }
}
</style>